package com.kingyun.gpsinspection.purificationservice.facade.service.tdm;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.EmployeeVo;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.AbnormalWorkOrderVo;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.WorkOrderApply;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.WorkOrderVo;

/**
 * Created by jiangjx on 2017/1/20.
 * 非正常工单处置service接口
 */
public interface AbnormalWorkOrderService {

    /**
     * 查询异常工单table数据
     *
     * @param abnormalWorkOrderVo 查询条件
     */
    JSONObject queryAbnormalWorkOrderList(AbnormalWorkOrderVo abnormalWorkOrderVo) throws Exception;


    /**
     * 修改工单
     *
     *
     * @param employeeVo
     * @param workOrderId 工单id
     * @return
     */
    Boolean updateWorkOrder(EmployeeVo employeeVo, WorkOrderVo workOrderId) throws Exception;

    /**
     * 获取工单信息
     *
     * @param workOrderId 工单id
     */
    WorkOrderVo getWorkOrderInfo(String workOrderId) throws Exception;

    /**
     * 修改工单状态(审批)
     *
     * @param employeeVo
     * @param workOrderId    工单id
     * @param approveState   审批意见：0同意，1驳回
     * @param approveOpinion 审批备注
     */
    boolean updateWorkOrder(EmployeeVo employeeVo, String workOrderId, String approveState, String approveOpinion) throws Exception;

    /**
     * 关闭工单
     *
     *
     * @param employeeVo
     * @param workOrderId 工单id
     * @return
     */
    boolean closeWorkOrder(EmployeeVo employeeVo, String workOrderId);

    /**
     * 加载审批信息
     *
     * @param workOrderApply 条件封装类
     * @return
     */
    JSONObject loadApproveInfo(WorkOrderApply workOrderApply);
}
